package com.yitiao.controller;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/rule")
public class LiteFlowController {
    @Resource
    private FlowExecutor flowExecutor;

    @GetMapping("/run")
    public void executeRule(){
        LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
    }
}
